<?php
/**
 * The following variables are available in this template:
 * - $this: the BootCrudCode object
 */
/** @var AweCrudCode $this */
?>
<?php echo "<?php\n" ?>
/** @var <?php echo $this->controllerClass; ?> $this */
/** @var <?php echo $this->modelClass; ?> $model */
<?php
$label = $this->pluralize($this->class2name($this->modelClass));
?>
$this->menu = array(
array('label' => Yii::t('AweCrud.app', 'Create'), 'icon' => 'plus', 'url' => array('create'), 
//'visible' => (Util::checkAccess(array('action_incidenciaPrioridad_create')))
),
);
?>
<div id="flashMsg"  class="flash-messages">

</div> 






<div class="well grey">
    <div class="well-header">
        <h5>Multimedia table</h5>
        <ul>
            <li class="color_pick"><a href="#"><i class="icon-th"></i></a>
                <ul>
                    <li><a class="blue set_color" href="#"></a></li>
                    <li><a class="light_blue set_color" href="#"></a></li>
                    <li><a class="grey set_color" href="#"></a></li>
                    <li><a class="pink set_color" href="#"></a></li>
                    <li><a class="red set_color" href="#"></a></li>
                    <li><a class="orange set_color" href="#"></a></li>
                    <li><a class="yellow set_color" href="#"></a></li>
                    <li><a class="green set_color" href="#"></a></li>
                    <li><a class="dark_green set_color" href="#"></a></li>
                    <li><a class="turq set_color" href="#"></a></li>
                    <li><a class="dark_turq set_color" href="#"></a></li>
                    <li><a class="purple set_color" href="#"></a></li>
                    <li><a class="violet set_color" href="#"></a></li>
                    <li><a class="dark_blue set_color" href="#"></a></li>
                    <li><a class="dark_red set_color" href="#"></a></li>
                    <li><a class="brown set_color" href="#"></a></li>
                    <li><a class="black set_color" href="#"></a></li>
                </ul>
            </li>
        </ul>
    </div>
    <div class="well-content">

        <?php echo "    <?php"; ?> 
        $this->widget('bootstrap.widgets.TbGridView',array(
        'id' => '<?php echo $this->class2id($this->modelClass); ?>-grid',
        'type' => 'striped bordered hover advance',
        'dataProvider' => $model->search(),
        'columns' => array(
        <?php
        $count = 0;
        foreach ($this->tableSchema->columns as $column) {
            if ($column->isPrimaryKey || in_array($column->name, $this->descriptionFields)) {
                continue;
            }
            if (++$count == 7):
                ?>
                /*<?php echo "\n" ?>
            <?php endif; ?>
            <?php echo $this->generateGridViewColumn($this->modelClass, $column) . ",\n" ?>
            <?php
        }
        if ($count >= 7):
            ?>
            */<?php echo "\n" ?>
        <?php endif; ?>
        array(
        'class' => 'CButtonColumn',
        'template' => '{update} {delete}',
        'afterDelete' => 'function(link,success,data){ 
        if(success) {
        $("#flashMsg").empty();
        $("#flashMsg").css("display","");
        $("#flashMsg").html(data).animate({opacity: 1.0}, 5500).fadeOut("slow");
        }
        }',
        'buttons' => array(
        'update' => array(
        'label' => '<button class="btn"><i class="icon-pencil"></i></button>',
        'options' => array('title' => 'Actualizar'),
        'imageUrl' => false,
        //'visible' => 'Util::checkAccess(array("action_incidenciaPrioridad_update"))'
        ),
        'delete' => array(
        'label' => '<button class="btn "><i class="icon-trash"></i></button>',
        'options' => array('title' => 'Eliminar'),
        'imageUrl' => false,
        //'visible' => 'Util::checkAccess(array("action_incidenciaPrioridad_delete"))'
        ),
        ),
        'htmlOptions' => array(
        'width' => '80px'
        )
        ),
        ),
        )); ?>
    </div>
</div>